﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/expand.js")" type="text/javascript"></script>
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.base.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.dialog.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery-ui-1.8.18.custom.css")" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function OnSuccessGeneral(data) {
            $('<div></div>').html(data).dialog({ modal: true, height: "700", width: "auto", close: function () { $(this).remove(); } });
        }
        function OnSuccessRating(data) {

            if (!Boolean(data.Success)) {
                $('<div></div>')
		.html(data.ReturnString)
		.dialog({
		    autoOpen: true,
		    title: 'Error Rating',
		    modal: true,
		    buttons: { "Ok": function () { $(this).dialog("close"); } },
		    close: function () { $(this).remove(); }

		});

            }
            else {
                $("#rating" + data.Type + "Number" + data.Id).text(data.Rating);
            }
        }
        function OnFailureRating() {

            $('<div></div>')
		.html("You need to login before rating")
		.dialog({
		    autoOpen: true,
		    title: 'Error Rating',
		    modal: true,
		    buttons: { "Ok": function () { $(this).dialog("close"); },
		        close: function () { $(this).remove(); }
		    }

		});
        }
        function OnSuccessCreate(data) {


            $('<div></div>').html(data).dialog({ modal: true, height: "700", width: "auto" });
            tog();
        }


        function DeleteRow() {

            if ($(this).parents('tr').first().next('tr').children('td').first().attr('colspan') > 1) {
                $(this).parents('tr').first().next('tr').slideFadeUp();
            }

            $(this).parents('tr').first().slideFadeUp();


        }
    </script>
</head>
<body>
    <script type="text/javascript">
        $(function () {
            $("div.expand").toggler();
            $('span.expand').toggler();
            $("#content").expandAll({ trigger: "h2.expand", ref: "div.demo", localLinks: "p.top a" });
        });
        function tog() {
            $("span.expandDialog").toggler({ container: "div.ui-dialog-content " });
        }
    </script>
    <div class="page">
        <div id="header">
            <div id="title">
                <h1>
                    Question Comet</h1>
            </div>
            <div id="logindisplay">
                @Html.Partial("_LogOnPartial")
            </div>
            <div id="menucontainer">
                <ul id="menu">
                    <li>@Html.ActionLink("Home", "Index", "Home")</li>
                    <li>@Html.ActionLink("Questions", "Index", "Question")</li>
                    <li>@Html.ActionLink("Profile", "Index", "Profile")</li>
                    <li>@Html.ActionLink("Courses", "Index", "Course")</li>
                    <li>@Html.ActionLink("About", "About", "Home")</li>
                </ul>
            </div>
        </div>
        <div id="main">
            @RenderBody()
        </div>
        <div id="footer">
        </div>
    </div>
</body>
</html>
